import request from '@/utils/request'

export function labels() {
  return request({
    url: '/system/black/labels',
    method: 'get'
  })
}

export function setLabels(data) {
  return request({
    url: '/system/black/setLabels',
    method: 'post',
    data: data
  })
}

export function listBlacklist(query) {
  return request({
    url: '/system/black/list',
    method: 'get',
    params: query
  })
}

export function listByElem(path) {
  return request({
    url: '/system/black/listByElem?'+path,
    method: 'get'
  })
}

export function getBlacklist(id) {
  return request({
    url: '/system/black/' + id,
    method: 'get'
  })
}

export function addBlacklist(data) {
  return request({
    url: '/system/black',
    method: 'post',
    data: data
  })
}

export function updateBlacklist(data) {
  return request({
    url: '/system/black',
    method: 'put',
    data: data
  })
}

export function delBlacklist(id) {
  return request({
    url: '/system/black/' + id,
    method: 'delete'
  })
}
